package com.atguigu.gmall.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class PaymentController {

    @RequestMapping("/pay.html")
    public String pay(@RequestParam("orderId") Long orderId, Model model) {
        model.addAttribute("orderId", orderId);
        return "order/success.html";
    }

    @RequestMapping("/pay/success.html")
    public String successPage() {
        return "payment/success.html";
    }
}
